package 字符流;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class demo3 {
    public static void main(String[] args) throws IOException {
            try (Writer writer=new FileWriter("D:\\abcd.txt",true)){
                //直接使用write方法就可以写入数据
                writer.write("我在学习文件IO");
            }
    }
}
